Data correction method, apparatus and program

ABSTRACT

Natural images which are similar to each other contained in a page represented by page description data are corrected so that they have natural appearance to the eye. To achieve this object, an image recognizing unit recognizes images in a page represented by page description data, and a natural image determining unit determines whether or not each recognized image is a natural image. An image analyzing unit calculates a setup condition for image correction for each natural image. A second correction condition calculating unit calculates, for the similar natural images being similar to each other, a correction condition for making image qualities of the similar natural images substantially uniform. An image correcting unit applies image correction based on the setup condition and the correction condition to the similar natural images.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to data correction apparatus and methodfor correcting data when page description data representing pagescontaining images and texts is converted into raster data for printing,as well as a program for causing a computer to carry out the datacorrection method.

2. Description of the Related Art

Conventionally, in the field of printing, DTP (DeskTop Publishing),which uses a computer to carry out editing operations, has widely beenapplied. DTP realizes the idea of “WYSIWYG” (What You See Is What YouGet), which allows an operator to edit texts and images with viewingthem displayed on a screen to check the appearance of prints beforeprinting the images and texts on a printer or the like.

A software used in DTP by the operator for editing texts and images isgenerally called a DTP software. The DTP software generates data in aformat referred to as page description data, which represents theappearance of respective pages, based on the texts and images edited bythe operator. Since the page description data cannot directly be outputby an output device such as a printer, the page description data isconverted into raster data, which can be outputted by the output device,by a RIP (Raster Image Processor), and then the output device outputs anoutput image based on the raster data.

Along with spread of digital cameras, photographed images taken withdigital cameras are widely used as images for printing. Photographedimages may have problems such that a photographed image taken againstthe sun is paler. In such cases, a retouching software for modifying theimages is used to correct colors of each photographed image. Manuallycorrecting colors of images using a mouse or the like requires a highlevel of skill. However, in recent years, a retouching software havingan automatic setup function has been known, which analyzescharacteristics of colors of an image such as tones of colors, andautomatically applies color correction depending on the characteristicsto the image. The operator can use the automatic setup function of theretouching software to automatically calculate setup conditions andapply color correction to images based on the setup conditions, andthen, using a DTP software, the operator paste the images, which havebeen subjected to the color correction and have colors pleasing to theeye, on a page represented by page description data.

However, if a large number of photographed images are used as images forprinting, it is extremely troublesome and time-consuming to start up theretouching software, apply color correction to each photographed image,and paste the images on pages, even with the above-described automaticsetup function.

Such troublesomeness is particularly problematic when a printer forprinting called an on-demand printer is connected to the RIP to produceprints. Unlike a printing press, the on-demand printer does not requireplate making, and thus can significantly reduce printing costs andprocessing time for outputting images. Therefore, in recent years, theon-demand printers are widely used for creating business documents, andthe like. Since prints produced with the on-demand printers aretypically not expected to have image quality as strict as printsproduced through large-scale operations with a printing press, users ofthe on-demand printers have strong demands for a technique that allowsthe users to easily carry out a series of editing operations, includingthe above-described color correction, without taking much time. Inparticular, there are increasing demands for a technique that allows theusers to paste photographed images taken with digital cameras onbusiness documents and alleviates the above-described troublesomeoperations.

A technique has been proposed, in which images in a page represented bypage description data are recognized, and correction is applied to eachof the recognized images using the automatic setup function (see U.S.Patent Application Publication No. 20040234156). According to thistechnique, time and effort for producing output images including theimages subjected to image correction can be reduced.

In a case where multiple natural images taken with a digital camera arecontained in a page, the natural images may be similar to each othersuch that the same person is contained in the natural images or thenatural images have similar colors to each other. According to thetechnique described in the above U.S. Patent Application Publication No.20040234156, such similar natural image being similar to each other areseparately subjected to image correction by the automatic setupfunction. As a result, although the images are similar to each other,they may have different image qualities such as lightness and/or colorsafter the image correction, and this may introduce inconsistency to thepage containing these images.

SUMMARY OF THE INVENTION

In view of the above-described circumstances, the present invention isdirected to provide natural appearance of natural images which aresimilar to each other.

The data correction apparatus according to the invention includes: imagerecognizing means for recognizing images in a page represented by pagedescription data, the page description data describing the pagecontaining at least the images among the images and texts; natural imagedetermining means for determining whether or not each image recognizedby the image recognizing means is a natural image; similaritydetermining means for determining similar natural images being similarto each other among the natural images determined by the natural imagedetermining means when more than one natural images are contained in thepage; image analyzing means for calculating a setup condition for imagecorrection for each natural image; correction condition calculatingmeans for calculating, for all the similar natural images, a correctioncondition for making image qualities of the similar natural imagessubstantially uniform; and image correcting means for applying imagecorrection based on the setup condition and the correction condition tothe similar natural images.

The “making image quality substantially uniform” means making imagefeatures of the similar natural images which influence appearance of thesimilar natural images to the eye, such as lightness, colors and/or toneof the similar natural images, substantially uniform.

The data correction method according to the invention includes the stepsof: recognizing images in a page represented by page description data,the page description data describing the page containing at least theimages among the images and texts; determining whether or not eachrecognized image is a natural image; determining similar natural imagesbeing similar to each other among the determined natural images whenmore than one natural images are contained in the page; calculating asetup condition for image correction for each natural image;calculating, for all the similar natural images, a correction conditionfor making image qualities of the similar natural images substantiallyuniform; and applying image correction based on the setup condition andthe correction condition to the similar natural images.

It should be noted that the invention may be provided as acomputer-readable recording medium storing a program for causing acomputer to execute the data correction method according to theinvention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram showing the configuration of animage processing system to which a data correction apparatus accordingto an embodiment of the present invention is applied,

FIG. 2 is a functional block diagram of a RIP,

FIG. 3 is a diagram showing a natural image object with an illustrationimage object added as a background,

FIG. 4 shows a table for calculating adjustment values based onlightness information,

FIG. 5 is a flowchart showing a process carried out in the embodiment,and

FIG. 6 is a diagram showing a modification screen for further correctionof corrected page description data.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, an embodiment of the present invention will be described indetail with reference to the drawings. FIG. 1 is a schematic blockdiagram showing the configuration of an image processing system to whicha data correction apparatus according to the embodiment of the inventionis applied. As shown in FIG. 1, the image processing system according tothis embodiment is used with a DTP environment where a computer is usedto produce prints. In the image processing system, a page containingtexts and images edited by an operator using a personal computer (PC)100 is outputted from a color printer 200.

Image data such as image data generated via a color scanner (not shown)reading an original image and image data obtained via a digital cameraare inputted to the PC 100.

At the PC 100, the operator electronically edits a page containing textsand images based on the inputted image data, and page description datarepresenting the edited page is generated. The page description data islanguage data described in the so-called PDL (Page DescriptionLanguage), and cannot directly be outputted by the color printer 200.Therefore, the page description data is inputted to a RIP 101, where thepage description data is converted into raster data that can beoutputted by the color printer 200. The converted raster data isinputted to the color printer 200, where an output image 201 isgenerated based on the inputted raster data.

Characteristic features of one embodiment of the invention in the imageprocessing system shown in FIG. 1 lies in contents of processing carriedout at the RIP 101 in the PC 100. Now, the function of the RIP 101 willbe described. It should be noted that a program for executing thefunction of the RIP 101 is recorded in a recording medium such as a CDor DVD, and the program is installed on the PC 100 to allow execution ofthe function of the RIP 101.

FIG. 2 is a functional block diagram of the RIP. In the followingdescription, outline of components of the RIP 101 and operations ofthese components will be explained.

As shown in FIG. 2, the RIP 101 includes an image recognizing unit 10, anatural image determining unit 11, an image analyzing unit 12, an imagequality adjustment information calculating unit 13, a first correctioncondition calculating unit 14, a second correction condition calculatingunit 15, an image correcting unit 16, an image synthesizing unit 17 andan image converting unit 18. Further, as functions of the PC 100 onwhich the RIP 101 is installed, an input unit 19 formed, for example, bya keyboard and a mouse, and an image display unit 20 formed, forexample, by a monitor are provided.

The page description data representing the page edited by the operatoris inputted to the image recognizing unit 10. In the page descriptiondata, the images contained in the page are handled as graphic objectsand the texts contained in the page are handled as text objects. Theimage recognizing unit 10 recognizes graphic objects G0 and text objectsT0 contained in the page represented by the inputted page descriptiondata. The image recognizing unit 10 also recognizes layout informationL0 representing layout of the graphic objects G0 and the text objects T0on the page. If multiple images are contained in a single page, eachimage is recognized as one graphic object G0.

The natural image determining unit 11 determines whether each graphicobject G0 is a natural image or an illustration image. Specifically, asdescribed, for example, in Japanese Unexamined Patent Publication No.2000-032287, the luminance distribution and the number of colors arefound for each graphic object, and if the graphic object has a wideluminance distribution and a number of colors greater than apredetermined number, the graphic object G0 is determined to be anatural image object N0. Otherwise, the graphic object G0 is determinedto be an illustration image object I0. It should be noted that themethod for determining whether the graphic object G0 is a natural imageor an illustration image is not limited to the above-described method,and various known methods can be used for this determination.

The image analyzing unit 12 analyzes the natural image object N0 andcalculates setup conditions for the natural image object N0 to applyimage correction to the natural image object N0 at the image correctingunit 16. Specifically, an AE/AWB correction value, a lightnesscorrection value, a tone correction value, a color correction value anda sharpness correction value are calculated as the setup conditions forimage correction to optimize image quality of the natural image objectN0.

The image quality adjustment information calculating unit 13 calculatesimage quality adjustment information, which is information necessary forcorrecting the setup conditions calculated by the image analyzing unit12 for the natural image object N0. For this purpose, the image qualityadjustment information calculating unit 13 includes: an image useacquiring unit 13A which estimates use of the page description databased on a scene represented by the natural image object N0 and obtainsuse information based on the scene as the image quality adjustmentinformation; a text use acquiring unit 13B which estimates use of thepage description data based on the text object T0 and obtains useinformation based on the text as the image quality adjustmentinformation; a color contrast information acquiring unit 13C whichobtains lightness information of the illustration image object I0 as theimage quality adjustment information if any illustration image object I0is added as the background around the natural image object N0; and asimilar scene information acquiring unit 13D which obtains, as the imagequality adjustment information, similar scene information that specifiesnatural image objects N0 which are similar to each other if scenesrepresented by multiple natural image object N0 includes similar scenes.

The image use acquiring unit 13A extracts feature quantity representinga feature of the scene from the natural image object N0, and inputs thefeature quantity to a classifier, which has been generated in advancefor determining the use, to obtain the use information. As the featurequantity representing the feature of the scene, pixel values or acombination of pixel values on predetermined positions on a normalizedimage of the natural image object N0, which is obtained by normalizingthe size of the natural image object N0, can be used.

The classifier is generated through a machine learning process such asneural network or boosting, using images with predefined uses as correctanswer data and images without defined use as incorrect answer data. Asthe images having defined uses, for example, images of a catalog ofmetal products, a catalog of automobiles or a flower photo book may beused so that information indicating whether or not the use of thenatural image object N0 is for a catalog of metal products, a catalog ofautomobiles or a flower photo book can be obtained as the useinformation. If the use cannot be identified based only on the useslearned by the classifier, use information indicating that the use basedon the scene is undefined is obtained.

The text use acquiring unit 13B carries out character recognition on thetext object T0 and extracts terms contained in the text object T0. Thetext use acquiring unit 13B has a data base containing various terms andassociated uses. In the data base, terms and uses are associated suchthat terms such as “CPU”, “memory” and “hard disk” are associated with“computer catalog”, and terms such as “rose” and “Phalaenopsis orchid”are associated with “flower photo book”. Thus, the use information basedon the text can be obtained by referencing the data base based on theextracted terms. If an extracted term is not registered in the database, use information indicating that the use based on the text isundefined is obtained.

The color contrast information acquiring unit 13C determines whether ornot any illustration image object I0 is added as the background aroundthe natural image object N0 as shown in FIG. 3, based on the naturalimage object N0 and the layout information L0. Then, for each naturalimage object N0′ with a background, which has the illustration imageobject I0 added as the background, the color contrast informationacquiring unit 13C calculates lightness, hue and saturation of theillustration image object I0 based on R, G and B values of theillustration image object I0 added as the background. Specifically, theR, G and B values are converted into the L*a*b* color space based onarithmetic expressions according to IEC, CIE, and thus calculated L*,Hab* and Cab* values of all the pixels of the illustration image objectI0 are respectively averaged to obtain Lm, Hm and Cm values, whichrespectively serve as lightness information, hue information andsaturation information.

In a case where the page description data includes multiple naturalimage objects N0, the similar scene information acquiring unit 13Ddetermines, based on the natural image objects N0 and the layoutinformation L0, whether or not the natural image objects N0 are similarto each other for each possible combination thereof, and obtains IDs ofthe images which are similar to each other as the similar sceneinformation.

Various known techniques can be used for determining similarity betweenthe images. Specifically, for example, photographic subjects containedin two natural image objects N0 may be discriminated, and if the samephotographic subject is contained in these natural image objects N0,then the two natural image objects N0 may be determined to be similar toeach other. Alternatively, feature quantities such as lightness andcolors of two natural image objects N0 may be calculated, and if anabsolute value of a difference between the feature quantities of the twonatural image objects N0 is within a predetermined range, then, the twonatural image objects N0 may be determined to be similar to each other.Further alternatively, these feature quantities may be used fordetermination using a classifier, which is generated through a machinelearning technique such as neural network or boosting.

The first correction condition calculating unit 14 calculates firstcorrection conditions for correcting the setup conditions obtained bythe image analyzing unit 12, depending on the use information from theimage quality adjustment information inputted from the image qualityadjustment information calculating unit 13. Specifically, the firstcorrection condition calculating unit 14 has a data base containing thecorrection conditions associated with the uses. The correctionconditions are obtained by referencing the data base based on the useinformation obtained by the image use acquiring unit 13A or the text useacquiring unit 13B, and are inputted to the image correcting unit 16.For example, if the use is “catalog of metal products”, then acorrection condition for increasing sharpness enhancement may beobtained, and if the use is “flower photo book”, then a correctioncondition for increasing contrast may be obtained. If the use isundefined, the first correction condition calculating unit 14 does notcalculate the correction conditions.

The second correction condition calculating unit 15 calculates secondcorrection conditions for correcting the setup conditions obtained bythe image analyzing unit 12, based on the lightness information, the hueinformation and the saturation information (the lightness information,the hue information and the saturation information are collectivelycalled color contrast information) obtained by the color contrastinformation acquiring unit 13C, and the similar scene informationobtained by the similar scene information acquiring unit 13D. Forexample, the second correction condition calculating unit 15 stores atable containing lightness adjustment values associated with thelightness information. For the correction condition based on thelightness information, the lightness adjustment value is calculated asthe second correction condition based on the lightness informationinputted from the color contrast information acquiring unit 13C.Calculation of the correction condition based on the similar sceneinformation will be described later. If none of the color contrastinformation and the similar scene information is inputted, the secondcorrection condition calculating unit 15 does not calculate thecorrection conditions.

Now, calculation of the adjustment value based on the color contrastinformation will be described. FIG. 4 shows a table for calculating anadjustment value based on the lightness information of the colorcontrast information. As shown in FIG. 4, this table is used forcalculating an adjustment value CL so that the greater the lightnessinformation value Lm, the greater the lightness. In FIG. 4, “+”represents a range of adjustment values that makes the image darker, and“−” represents a range of adjustment values that makes the imagelighter. In the case where the illustration image object I0 is added asthe background around the natural image object N0, the appearance of thenatural image object N0 to the eye is influenced by the lightness of theillustration image object I0. For example, if the illustration imageobject I0 is light, then the natural image object N0 appears darker tothe eye, and if the illustration image object I0 is dark, then thenatural image object N0 appears lighter to the eye. Therefore, byreferencing the table shown in FIG. 4 for calculating the adjustmentvalue for the lightness, the adjustment value for the lightness iscalculated so that the natural image object N0 is made lighter if theillustration image object I0 is light, and natural image object N0 ismade darker if the illustration image object I0 is dark.

It should be noted that the color contrast phenomenon occurs not onlyfor lightness (lightness contrast), but also for hue (hue contrast),saturation (saturation contrast), and the like. For example, in the caseof the hue contrast, if the color of the area around the natural imageobject N0 is green, the colors of the natural image object N0 appear tothe eye with a tinge of magenta, which is the complementary color ofgreen, and if the color of the area around the natural image object N0is magenta, the colors of the natural image object N0 appear to the eyewith a tinge of green, which is the complementary color of magenta. Inthe case of the saturation contrast, if the area around the naturalimage object N0 has a high-saturation color, the saturation of thenatural image object N0 appears lower to the eye, and if the area aroundthe natural image object N0 has a low-saturation color, the saturationof the natural image object N0 appears higher to the eye. Therefore, theappearance of the natural image object N0 to the eye is influenced notonly by the lightness but also by the hue and the saturation. Thus,using tables defined in advance for hue and saturation, which correspondto the table of FIG. 4, a hue adjustment value CH and a saturationadjustment value CS are calculated respectively based on the hueinformation Hm and the saturation information Sm of the illustrationimage object I0.

Next, calculation of the correction condition based on the similar sceneinformation and the color contrast information will be described. Thiscorrection condition makes image quality of the natural image objects N0which are similar to each other substantially uniform. Further, thecorrection condition makes appearance of the natural image object N0′ tothe eye uniform, depending on the color of the illustration image objectI0 around the natural image object N0′. As the similar scene informationis inputted, the second correction condition calculating unit 15obtains, for the images similar to each other based on the similar sceneinformation, the AE/AWB correction values of the setup conditionscalculated by the image analyzing unit 12 and calculates a mean value ofthe correction values. Assuming that the mean value of the AE/AWBcorrection values is a mean value Ma, images represented by the naturalimage objects N0 similar to each other based on the similar sceneinformation are P1 and P2, and the AE/AWB correction values for theimages P1, P2 are A1 and A2, then the second correction conditioncalculating unit 15 calculates AE/AWB adjustment values Ap0 and Ap2 forthe images P1 and P2 according to formulae (1) and (2) below, where eachAE/AWB correction value is a density value, and the AE/AWB correctionvalues are independently set for the respective R, G and B colors:Ap1=Ma−A1  (1)Ap2=Ma−A2  (2).

By applying AE/AWB correction to the images P1 and P2 using the thuscalculated AE/AWB adjustment values Ap1 and Ap2, substantially uniformappearance to the eye of lightness and colors of the corrected images P1and P2 can be obtained.

Next, assuming that an image represented by the natural image object N0′is q, then the second correction condition calculating unit 15calculates an AE/AWB adjustment value Aq for the image q according toformulae (3) to (5) below:Aqr=f(CL,CH,CS)  (3)Aqg=f(CL,CH,CS)  (4)Aqb=f(CL,CH,CS)  (5)where f( ) is a function for obtaining R, G and B values from L, Hab*and Cab* values based on the arithmetic expressions according to IEC,CIE and converting the obtained values into a density space.

The image correcting unit 16 applies image correction to the naturalimage object N0 based on the setup conditions calculated by the imageanalyzing unit 12 and the first and second correction conditionscalculated by the first and second correction condition calculatingunits 14 and 15 to obtain a corrected natural image object N1. The imagecorrection is carried out based on the setup conditions calculated bythe image analyzing unit 12, and includes AE/AWB correction, lightnesscorrection, tone correction, color correction, sharpness correction, andthe like. As described later, fine adjustment of the corrected naturalimage object N1 can be carried out by the user manually inputtingmodification instructions to the displayed corrected page descriptiondata via the input unit 19.

For a natural image object N0 that have no illustration image object I0added as a background and no other natural image object N0 being similarthereto, the image correcting unit 16 carries out image correction basedonly on the setup conditions. For a natural image object N0′ with abackground and/or a natural image object N0 having other natural imageobject N0 being similar thereto, the image correcting unit 16 carriesout image correction based on the setup conditions and the secondcorrection conditions. For a natural image object N0 with an estimateduse, the image correcting unit 16 carries out image correction basedfurther on the first correction conditions.

The image synthesizing unit 17 synthesizes the page description databased on the corrected natural image object N1, the text object T0 andthe layout information L0 to obtain corrected page description data.

The image converting unit 18 converts the corrected page descriptiondata into raster data and outputs the raster data to the color printer200.

Next, operation of this embodiment will be described. FIG. 5 is aflowchart showing a process carried out in the embodiment. As aninstruction to correct the page description data is inputted from theinput unit 19, the RIP 101 starts the process, and the image recognizingunit 10 recognizes the graphic objects G0 and the text objects T0contained in a page represented by the page description data, as well asthe layout information L0 representing layout of the graphic objects G0and the text objects T0 on the page (step ST1).

Then, for each of the graphic objects G0, the natural image determiningunit 11 determines whether the graphic objects G0 is a natural image oran illustration image (step ST2). Then, the image analyzing unit 12calculates the setup conditions for each natural image object N0 (stepST3). Meanwhile, the image quality adjustment information calculatingunit 13 calculates the image quality adjustment information which isinformation necessary for correcting the setup conditions calculated bythe image analyzing unit 12 for the natural image object N0 (step ST4).It should be noted that steps ST3 and ST4 may be carried out inparallel, or step ST4 may be carried out before step ST3.

Then, the first and second correction condition calculating units 14 and15 calculate the first and second correction conditions based on theimage quality adjustment information (step ST5). Subsequently, the imagecorrecting unit 16 corrects each natural image object N0 based on thesetup conditions and the first and second correction conditions toobtain the corrected natural image object N1 (step ST6). Further, theimage synthesizing unit 17 synthesizes the page description data basedon the corrected natural image objects N1, the text objects T0 and thelayout information L0 to obtain the corrected page description data(step ST7). Then, the corrected page description data is displayed onthe image display unit 20 (step ST8).

The image correcting unit 16 determines whether or not any modificationinstruction is received from the input unit 19 (step ST9). If themodification instruction is received, modification values for the setupconditions are calculated based on the modification instruction, and thecorrected natural image object N1 is modified according to thecalculated modification values to obtain a modified corrected naturalimage object N2 (step ST10). Then, the process returns to step ST7 torepeat the operations in step ST7 and the following steps. That is, thepage description data is synthesized based on the modified correctednatural image objects N2, the text objects T0 and the layout informationL0 to obtain new corrected page description data. Then, the newcorrected page description data is displayed on the image display unit20.

If a negative determination is made in step ST9, further determinationis made as to whether or not a print instruction is received from theinput unit 19 (step ST11). Then, if a negative determination is made instep ST11, the process returns to step ST9. If an affirmativedetermination is made in step ST11, the image converting unit 18converts the corrected page description data into raster data (stepST12), the color printer 200 prints the raster data (step ST13), and theprocess ends.

As described above, in this embodiment, correction conditions arecalculated for the natural image objects N0 which similar to each otherfor making image qualities thereof substantially uniform, and imagequality correction is applied to the similar natural image objects N0based on the setup condition and the correction condition. In thismanner, image qualities of the similar natural image objects N0 can bemade substantially uniform, and thus a consistent page containing thenatural images with substantially uniform appearance to the eye can beobtained.

In this embodiment, for the natural image object N0′ with theillustration image object I0 added thereto as the background, imagequality correction is applied to the natural image object N0′ based onthe setup conditions which have been corrected depending on lightness,hue and saturation of the illustration image object I0, as describedabove. Thus, the lightness, hue and saturation of the natural imageobject N0 contained in the page can be modified depending on thelightness, hue and saturation of the background illustration imageobject I0.

Further, in the above-described embodiment, the following correction canbe carried out when the corrected page description data obtained frompage description data containing multiple images is displayed on theimage display unit 20. FIG. 6 shows a modification screen for allowingfurther correction of the corrected page description data. As shown inFIG. 6, the modification screen 30 includes a page display area 30A fordisplaying a page image represented by the page description data, alightness correction button 30B for correcting lightness, and a colorcorrection button 30C for correcting colors. In the example of FIG. 6,the page described by the page description data contains images P11, P12and P13 represented by three natural image objects N0.

The operator uses the input unit 19 to specify a desired position (afirst position) on the page image. In this example, the point O1 in theimage P13 shown in FIG. 6 is specified. Next, a second position, whichis different from the first position, is specified. In this example, thepoint O2 in the image P12 shown in FIG. 6 is specified. Thereafter, theoperator clicks the lightness correction button 30B, and an amount ofcorrection for correcting the lightness of the point O2 to be the sameas the lightness of the point O1 is calculated from a difference inlightness between the point O1 and the point O2. Then, the image P12 iscorrected according to the calculated amount of correction.

Specifically, assuming that R, G and B values at the point O1 are Ro1,Go1 and Bo1 and R, G and B values at the point O2 are Ro2, Go2 and Bo2,respectively, a mean value Mo1 of the R, G and B values at the point O1and a mean value Mo2 of the R, G and B values at the point O2 arecalculated according to formulae (6) and (7) below:Mo1=(Ro1+Go1+Bo1)/3  (6)Mo2=(Ro2+Go2+Bo2)/3  (7).

Then, Mo1-Mo2 is calculated as the amount of correction, and the amountof correction (1-Mo2) is subtracted from the R, G and B values of allthe pixels of the image P12 to correct the image P12. Thus, thelightness of the image P12 is corrected so that the lightness at thepoint O2 is the same as the lightness at the point O1.

In a case where color correction is carried out, the operator clicks thecolor correction button 30B after specifying the points O1 and O2, andan amount of correction for correcting the color at the point O2 to bethe same as the color at the point O1 is calculated. Then, the image P12is corrected according to the calculated amount of correction.

Specifically, assuming that R, G and B values at the point O1 are Ro1,Go1 and Bo1 and R, G and B values at the point O2 are Ro2, Go2 and Bo2,respectively, difference values Rsub, Gsub and Bsub for the respectiveR, G and B values are calculated as the amount of correction accordingto formulae (8) to (10) below:Rsub=Ro1−Ro2  (8)Gsub=Go1−Go2  (9)Bsub=Bo1−Bo2  (10).

Then, the values of Rsub, Gsub, and Bsub are respectively added to theR, G and B values of all the pixels of the image P12 to correct theimage P12. Thus, the color of the image P12 is corrected so that thecolor at the point O2 is the same as the color at the point O1.

Moreover, although the lightness, hue and saturation of the naturalimage object N0 are corrected based on the lightness, hue and saturationof the illustration image object I0 in the above-described embodiment,at least one of the lightness, hue and saturation of the natural imageobject N0 may be corrected based on at least one of the lightness, hueand saturation of the illustration image object I0.

According to the invention, determination is made as to whether eachrecognized image is a natural image, and for similar natural imagesbeing similar to each other among the natural images, a correctioncondition for making the image qualities of the similar natural imagessubstantially uniform is calculated. Then, image correction based on thesetup condition and the correction condition is applied to the similarnatural images. In this manner, image qualities of the similar naturalimages can be made substantially uniform, and thus a consistent pagecontaining the natural images with substantially uniform appearance tothe eye can be obtained.

1. A data correction apparatus comprising: image recognizing means forrecognizing images in a page represented by page description data, thepage description data describing the page containing at least the imagesamong the images and texts; natural image determining means fordetermining whether or not each image recognized by the imagerecognizing means is a natural image based on a characteristic of theeach image; similarity determining means for determining, based onwhether subjects included in a plurality of natural images determined bythe natural image determining means or feature values of the pluralityof natural images are similar to each other, similar natural imagessimilar to each other when the plurality of natural images are containedin the page; image analyzing means for calculating a setup condition,including a lightness and colors correction value, for image correctionfor each natural image; correction condition calculating means forobtaining the lightness and colors correction value for each of all thesimilar natural images, and calculating, as a correction condition, anadjustment value of the lightness and colors correction value for makingthe lightness and colors correction value of all the similar naturalimages substantially uniform; and image correcting means for applyingimage correction based on the setup condition and the correctioncondition to the similar natural images.
 2. The data correctionapparatus as claimed in claim 1, wherein the correction conditioncomprises a condition for making image features of the similar naturalimages substantially uniform, the image features influencing appearanceof the similar natural images to the eye.
 3. The data correctionapparatus as claimed in claim 1, further comprising: a color contrastinformation acquiring means for acquiring color contrast informationrepresenting at least one of lightness, hue and saturation of anillustration image when the illustration image is added, as abackground, around the natural image in the page, wherein the correctioncondition calculation means further calculates, as the correctioncondition, another adjustment value for adjusting at least one oflightness, hue and saturation of the natural image based on the colorcontrast information to make the appearance of the natural image tohuman eyes uniform depending on the illustration image.
 4. The datacorrection apparatus as claimed in claim 1, further comprising: useacquiring means for acquiring use information representing a use of thenatural image; and another correction condition calculating means forfurther calculating another correction condition for correcting thesetup condition based on the use information, wherein the imagecorrection means applies image correction, based on the setup condition,the correction condition, and the another correction condition, to thesimilar natural images.
 5. A data correction method comprising the stepsof: recognizing images in a page represented by page description data,the page description data describing the page containing at least theimages among the images and texts; determining whether or not eachrecognized image is a natural image based on a characteristic of theeach image; determining, based on whether sub'ects included in a luralitof natural ima es determined or feature values of the plurality ofnatural images are similar to each other, similar natural images similarto each other when the plurality of natural images are contained in thepage; calculating a setup condition, including a lightness and colorscorrection value, for image correction for each natural image; obtainingthe lightness and colors correction value for each of all the similarnatural images; calculating, as a correction condition, an adjustmentvalue of the lightness and colors correction value for making thelightness and colors correction value of all the similar natural imagessubstantially uniform; and applying image correction based on the setupcondition and the correction condition to the similar natural images. 6.The data correction method as claimed in claim 5, wherein the correctioncondition comprises a condition for making image features of the similarnatural images substantially uniform, the image features influencingappearance of the similar natural images to the eye.
 7. A non-transitorycomputer-readable recording medium storing a program for causing acomputer to execute a data correction method comprising the proceduresof: recognizing images in a page represented by page description data,the page description data describing the page containing at least theimages among the images and texts; determining whether or not eachrecognized image is a natural image based on a characteristic of theeach image; determining, based on whether subjects included in aplurality of natural images determined or feature values of theplurality of natural images are similar to each other, similar naturalimages similar to each other when the plurality of natural images arecontained in the page; calculating a setup condition, including alightness and colors correction value, for image correction for eachnatural image; obtaining the lightness and colors correction value foreach of all the similar natural images; calculating, as a correctioncondition, an adjustment value of the lightness and colors correctionvalue for making the lightness and colors correction value of all thesimilar natural images substantially uniform; and applying imagecorrection based on the setup condition and the correction condition tothe similar natural images.
 8. The non-transitory computer-readablerecording medium as claimed in claim 7, wherein the correction conditioncomprises a condition for making image features of the similar naturalimages substantially uniform, the image features influencing appearanceof the similar natural images to the eye.